﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Tasks;
using System.Device.Location;

namespace CDFWPUG.Helpers
{
    public class FunctionsHelper
    {


        #region Tasks

        public static void CreatePhoneCallTask(string number, string displayName)
        {
            PhoneCallTask task = new PhoneCallTask()
            {
                PhoneNumber = number,
                DisplayName = displayName
            };

            task.Show();

        }

        public static void CreateWebsiteTask(string url)
        {
            WebBrowserTask task = new WebBrowserTask()
            {
                Uri = new System.Uri(url, System.UriKind.Absolute)
            };

            task.Show();
        }

        public static void CreateDirectionsTask(GeoCoordinate geoCoordinate, string label)
        {
            BingMapsDirectionsTask task = new BingMapsDirectionsTask()
            {
                End = new LabeledMapLocation(label, geoCoordinate)
            };

            task.Show();
        }

        #endregion

    }
}
